<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let obj={
            name:"黄紫红",
            age:18
        }

        let obj2=new Object

        obj2.name="黄紫朱红"
        obj2.kind="pig"
        obj2.eyes=1
        console.log(obj2)

        function Person(){
            this.name="黄紫红.plus"
            this.age=18
            this.hair="green"
        }

        let p1=new Person()
        console.log(p1.name)
        console.log(p1.age)
        console.log(p1.hair)
        console.log(p1)

        let ppname=prompt("请输入名字","黄紫深红")
        let pphair=prompt("请输入头发颜色","彩虹")
        let ppheight=prompt("请输入身高",177)
        function Person2(a,b,c){
            this.name=a
            this.hair=b
            this.height=c
        }

        let p2=new Person2(ppname,pphair,ppheight)
        console.log(p2)

        document.write("<div style='color:green;font-size:4em'><strong>这里是伟大的"+obj2.name+"</div>")
    </script>
</body>
</html>